<table>
	<thead>
		<tr>
			<td><b>Case ID</b></td>
			<td><b>Execution started at</b></td>
			<td><b>Execution ended at</b></td>
			<td><b>Execution Time</b></td>
			<td><b>Still in execution?</b></td>
			<td><b>Trace</b></td>
			<td><b>Time measurement</b></td>
		</tr>
	</thead>
	<%$EXECLOG.each do |key, times|%>
		<%next if key.nil?%>
		<%c = PNEngine::Case.find(key)%>
		<%times.sort!{|a,b|a[1] <=> b[1]}%>
		<tr>
			<td><%=key%></td>
			<td><%=times.first[1].strftime("%Y/%m/%d %H:%M:%S")%></td>
			<td><%=times.last[1].strftime("%Y/%m/%d %H:%M:%S")%></td>
			<td><%=times.last[1] - times.first[1]%></td>
			<td><%=c.tokens.any?{|t|t.place.arcs.any?{|a|a.from_is_place?}}%></td>
			<td>
				<%=
					times.collect do |t|
						t[0].kind_of?(ReceiveTransition) ? "<i>#{t[0].pid}</i>" : t[0].pid
					end.join(" # ")
				%>
			</td>
			<td>
				<form id="measure_form_<%=key%>" method="POST" action="/measure">
				    <select name="trans1" size="1">
						<%times.collect{|t|t[0]}.each do |trans|%>
							<option type="checkbox" value="<%=trans.id%>"><%=trans.pid%></option>
						<%end%>
				    </select>
				    <select name="trans2" size="1">
						<%times.collect{|t|t[0]}.each do |trans|%>
							<option type="checkbox" value="<%=trans.id%>"><%=trans.pid%></option>
						<%end%>
				    </select>
					<input type="hidden" name="case_id" value="<%=key%>" />
				</form>
				<a href="javascript:submitMonitorMeasure(<%=key%>)">Submit</a>
				<div id="measure_result_<%=key%>"></div>
			</td>
		</tr>
	<%end%>
</table>